import { Body, Controller, Get, Post, Query } from '@nestjs/common';
import { WorkloadService } from './workload.service';

@Controller('workload')
export class WorkloadController {
    constructor(
        private readonly workloadService: WorkloadService
    ) { }

    @Get("time")
    time(
        @Query("start_time") start_time: string,
        @Query("end_time") end_time: string,

    ) {
        return this.workloadService.getAllWork(end_time);
    }

    @Get("count")
    count() {
        return this.workloadService.getWorkCount()
    }
}
